/*
 * @Date: 2022-09-16 09:20:00
 * @LastEditTime: 2022-09-16 09:23:02
 */
import Layout from '@/layout'
export const Routes = [
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },

  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },

  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        name: 'Aashboard',
        component: () => import('@/views/dashboard/index'),
        meta: { title: '首页', icon: 'dashboard' }
      },
    ]
  },
]


export const allAsyncRoutes = [
  // 权限路由
  {
    path: '/acl',
    name: 'Acl',
    component: () => import('@/layout/index.vue'),
    meta: { title: '权限管理', icon: 'el-icon-s-tools' },
    children: [
      {
        path: 'user/list',
        name: 'User',
        component: () => import('@/views/acl/user/index.vue'),
        meta: {title: '用户管理'}
      },
      {
        path: 'role/list',
        name: 'Role',
        component: () => import('@/views/acl/role/index.vue'),
        meta: {title: '角色管理'}
      },
      {
        path: 'role/auth',
        name: 'RoleAuth',
        component: () => import('@/views/acl/role/auth/index.vue'),
        hidden: true,
        meta: {
          title: '角色管理',
          activeMenu: '/acl/role/list'
        }
      },
      {
        path: 'permission/list',
        name: 'Permission',
        component: () => import('@/views/acl/permission/index.vue'),
        meta: {title: '菜单管理'}
      },
    ]
  },

  
  // 商品路由
  {
    path: '/product',
    name: 'Product',
    component: () => import('@/layout/index.vue'),
    meta: { title: '商品管理', icon: 'el-icon-s-goods' },
    children: [
      {
        path: 'trademark/list',
        name: 'Trademark',
        component: () => import('@/views/product/trademark/index.vue'),
        meta: {title: '品牌管理'}
      },
      {
        path: 'attr/list',
        name: 'Attr',
        component: () => import('@/views/product/attr/index.vue'),
        meta: {title: '角色管理'}
      }
    ]
  },


  // 测试路由
  {
    path: '/test',
    name: 'Textwww',
    component: () => import('@/layout/index.vue'),
    meta: { title: '测试', icon: 'el-icon-lollipop' },
    children: [
      {
        path: 'test1/list',
        name: 'Testwww111',
        component: () => import('@/views/test/test1/index.vue'),
        meta: {title: 'Testwww111'}
      },
      {
        path: 'test2/list',
        name: 'Testwww222',
        component: () => import('@/views/test/test2/index.vue'),
        meta: {title: 'Testwww222'}
      }
    ]
  },
]


export const anyRoute = [
  { path: '*', redirect: '/404', hidden: true }
]

